package com.cq.hd.common.enums.biz;

import lombok.Getter;

/**
 * @description: 申请单类型：1-企业商户基本信息入驻审核通知，2-商户业务开通审核通知，3-商户业务开通成功通知
 * @author: mYunYu
 * @date: 2021/8/23 14:28
 * @version: v1.0
 */
public enum HfRequestRecordApplyTypeEnum {

    MERCHANT_ENT(1, "企业商户基本信息入驻请求"),
    MERCHANT_ENT_AUDIT(2, "企业商户基本信息入驻审核通知"),
    MERCHANT_OPEN(3, "商户业务开通请求"),
    MERCHANT_OPEN_AUDIT(4, "商户业务开通审核通知"),
    MERCHANT_OPEN_BUSINESS(5, "商户业务开通成功通知"),
    MERCHANT_SETTLE_CONFIG_OPEN(6, "子账号开通请求"),
    MERCHANT_SETTLE_CONFIG_OPEN_AUDIT(7, "子账号开通审核通知"),
    MERCHANT_ENT_INDV(8, "个人商户基本信息入驻请求"),
    MERCHANT_ENT_INDV_AUDIT(9, "个人商户基本信息入驻审核通知"),
    MERCHANT_OPEN_MODIFY(10, "商户业务开通修改请求"),
    WX_BUSINESS_CONFIG(11, "微信商户配置请求"),
    WX_BUSINESS_CONFIG_NOTIFY(12, "微信商户配置通知"),
    WX_BUSINESS_REAL_QUERY(13, "微信实名认证状态查询请求"),
    WX_PRE_ORDER(14, "微信小程序预下单"),
    WX_PRE_ORDER_ASYNC(15, "微信小程序预下单支付回调"),
    TRADE_REFUND(16, "交易退款"),
    TRADE_REFUND_ASYNC(17, "交易退款回调"),
    TRADE_REFUND_QUERY(18, "交易退款查询"),
    WX_JS_ORDER(19, "聚合支付下单"),
    WX_JS_ORDER_ASYNC(20, "聚合支付下单回调"),
    AGENT_USER_INVITE(21, "个人用户开户"),
    AGENT_USER_OPEN(22, "用户业务入驻"),
    AGENT_USER_OPEN_QUERY(23, "用户业务查询"),
    MERCHANT_SIGN_QUERY(24, "商户签约查询"),
    AGENT_SIGN_CREATE(25, "个人签约发起"),
    TRADE_ACCOUNT_AMT_PAY(26, "余额支付（给商户分本金）"),
    TRADE_ACCOUNT_AMT_QUERY(27, "余额支付查询"),
    TRADE_MARKET_TRANSFER_PAY(28, "补贴转账（给商户分补贴）"),
    TRADE_MARKET_TRANSFER_QUERY(29, "补贴转账查询"),
    AGENT_SIGN_QUERY(30, "个人签约查询"),
    SETTLEMENT(31, "结算提现"),
    SETTLEMENT_QUERY(32, "结算提现查询"),
    TRADE_AGENT_ACCOUNT_AMT_PAY(33, "余额支付（给经纪人分佣金）"),
    HYC_INV_CATEGORY_QUERY(34, "开票类目查询"),
    HYC_INV_APPLY(35, "申请开票（灵活用工）"),
    BANK_PAY(36, "网银支付"),
    HYC_INV_QUERY(37, "开票信息查询"),
    BANK_PAY_ASYNC(38, "网银支付回调"),
    MERCHANT_ENT_MODIFY(39, "商户基本信息修改"),
    AGENT_USER_OPEN_MODIFY(40, "用户业务入驻修改"),
    ACCT_BALANCE_QUERY(41, "账户余额信息查询"),
    USER_BASIC_DATA_QUERY(42, "用户信息查询"),
    MERCHANT_SETTLE_MODIFY(43, "修改子账号配置"),
    ;

    @Getter
    private final Integer value;

    @Getter
    private final String name;

    HfRequestRecordApplyTypeEnum(Integer value, String name) {
        this.value = value;
        this.name = name;
    }

    public static HfRequestRecordApplyTypeEnum typeOf(Integer value) {
        HfRequestRecordApplyTypeEnum[] values = HfRequestRecordApplyTypeEnum.values();
        for (HfRequestRecordApplyTypeEnum v : values) {
            if (v.value.equals(value)) {
                return v;
            }
        }
        return null;
    }

    public static HfRequestRecordApplyTypeEnum typeOf(String name) {
        HfRequestRecordApplyTypeEnum[] values = HfRequestRecordApplyTypeEnum.values();
        for (HfRequestRecordApplyTypeEnum v : values) {
            if (v.name.equals(name)) {
                return v;
            }
        }
        return null;
    }

}
